<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Quiz
 * @copyright  Copyright Hire-Experts LLC
 * @license    http://www.hire-experts.com
 * @version    $Id: view.tpl 2010-07-02 17:53 ermek $
 * @author     Ermek
 */
?>

<script type="text/javascript">
  var pageAction =function(page)
  {
	  window.location.href = en4.core.baseUrl+'inviter/referrals/'+page;
  }
</script>

<div class="headline">
  <div class="tabs">
    <?php
      // Render the menu
      echo $this->navigation()
        ->menu()
        ->setContainer($this->navigation)
        ->render();
    ?>
  </div>
</div>


<h3><?php echo $this->translate('INVITER_My Refferals'); ?></h3>
<p class="form-description"><?php echo $this->translate('INVITER_VIEWS_SCRIPTS_REFERRALS_DESCRIPTION'); ?></p>
<br/>

<div class='layout_middle' style="width:650px;">
  <div class='browsemembers_results' id='browsemembers_results'>
  		<?php if( $this->paginator->getTotalItemCount() > 0 ): ?>
	    	<ul id="browsemembers_ul">
	      <?php foreach ($this->paginator as $user): ?>
	        <li>
	          <?php echo $this->htmlLink($user->getHref(), $this->itemPhoto($user, 'thumb.icon')) ?>
	          <?php if( $this->viewer()->getIdentity() ): ?>
	            <div class='browsemembers_results_links'>
	              <?php echo $this->userFriendship($user) ?>
                <?php echo ($this->suggest_enabled) ? $this->suggestUserLink($user) : ''; ?>
	            </div>
	          <?php endif; ?>
	
	            <div class='browsemembers_results_info'>
	              <?php echo $this->htmlLink($user->getHref(), $user->getTitle()) ?>
	              <?php echo $user->status; ?>
	              <?php if( $user->status != "" ): ?>
	                <div>
	                  <?php echo $this->timestamp($user->status_date) ?>
	                </div>
	              <?php endif; ?>
	            </div>
	        </li>
	      <?php endforeach; ?>
	    	</ul>
      <?php else:
								echo $this->translate('INVITER_There are no referrals.');
						endif;	
			?>
			<?php echo $this->paginationControl($this->paginator, null, array("pagination/inviterpagination.tpl","inviter")); ?>
  </div>
</div>
